<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                template="layout/template.xhtml">

    <ui:define name="body">

        <h:messages globalOnly="true" styleClass="message"/>

        <h:form id="lotUserForm">

            <rich:panel>
                <f:facet name="header">#{messages['user']}</f:facet>

                <s:decorate id="usernameDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['user.name']}</ui:define>
                    #{lotUserHome.instance.username}
                </s:decorate>
                <s:decorate id="lastNameDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['user.lastname']}</ui:define>
                    #{lotUserHome.instance.lastName}
                </s:decorate>
                <s:decorate id="firstNameDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['user.firstname']}</ui:define>
                    #{lotUserHome.instance.firstName}
                </s:decorate>
                <s:decorate id="emailDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['user.email']}</ui:define>
                    #{lotUserHome.instance.emailAddress}
                </s:decorate>
                <s:decorate id="rolesDecoration" template="layout/display.xhtml">
                    <ui:define name="label">#{messages['user.role']}</ui:define>
                    #{lotUserHome.instance.role.name}
                </s:decorate>
                <div style="clear:both"/>

            </rich:panel>

            <div class="actionButtons">
                <s:button view="/lotUserEdit.xhtml"
                          id="edit"
                          value="#{messages['button.edit']}"/>
                <s:button view="/#{empty lotUserFrom ? 'lotUserList' : lotUserFrom}.xhtml"
                          id="done"
                          value="#{messages['button.done']}"/>
            </div>

        </h:form>

    </ui:define>

</ui:composition>

